/*
 * GLGoodsCommodity.h
 *
 *  Created on: Nov 1, 2014
 *      Author: yuliang
 */

#ifndef GLGOODSCOMMODITY_H_
#define GLGOODSCOMMODITY_H_


#include <string>
#include "GLGlobalInfo.h"
#include "LogicBase/GLGoodsBase.h"
#include "common/PIOStreamOperator.h"

class CGLGoodsCommodity: public CGLGoodsBase {
	friend std::string& operator<< (std::string& ss, uint64_t ti);
public:
	CGLGoodsCommodity();
	virtual ~CGLGoodsCommodity();
	virtual inline void Reset() { memset(&m_CommodityInfo, 0, sizeof(m_CommodityInfo)); }

	bool DecodeExtend(const std::string& info);
	bool EncodeExtend(std::string& info);
	inline void SetCommodityInfo(const CommodityInfo& info) { m_CommodityInfo = info; }
	inline CommodityInfo& GetCommodityInfo() { return m_CommodityInfo; }
private:
	CommodityInfo				m_CommodityInfo;
};

#endif /* GLGOODSCOMMODITY_H_ */
